﻿<views2:EntityPart x:Class="Conference.UX.Wpf.Views.SessionListEntityPart"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:views="clr-namespace:TeaLightV5.Foundation.UX.Wpf.MvvmCross.Views;assembly=TeaLightV5.Foundation.UX.Wpf"
            xmlns:tcl="clr-namespace:TeaLightV5.Foundation.UX.Wpf.Controls;assembly=TeaLightV5.Foundation.UX.Wpf"
                  xmlns:views2="clr-namespace:TeaLightV5.Foundation.UX.Wpf.Views;assembly=TeaLightV5.Foundation.UX.Wpf"
                  mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ListBox Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Data}" HorizontalContentAlignment="Stretch" >
            <ListBox.ItemTemplate>
                <DataTemplate >
                    <tcl:StackPanel TapCommand="{Binding ReadCommand}" >
                        <tcl:StackPanel DataContext="{Binding Data}" >
                            <TextBlock Text="Name"></TextBlock>
                            <TextBlock Text="{Binding Name, Mode=TwoWay}" />
                        </tcl:StackPanel>
                    </tcl:StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>


        <StackPanel Grid.Row="1">
            <Button Command="{Binding AddCommand}">Add</Button>
            <Button Command="{Binding RefreshCommand}">Refresh</Button>
        </StackPanel>
    </Grid>

</views2:EntityPart>
